package com.kds.smarthome.mapper;

import com.kds.smarthome.entity.EnergyStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EnergyStatisticsMapper {
    List<EnergyStatistics> findAll();
    
    EnergyStatistics findById(Long tid);
    
    List<EnergyStatistics> findByBuildingCode(String buildingCode);
    
    EnergyStatistics findByBuildingCodeAndItemCode(@Param("buildingCode") String buildingCode, 
                                                  @Param("statisticsItemCode") String statisticsItemCode);
    
    void insert(EnergyStatistics energyStatistics);
    
    void update(EnergyStatistics energyStatistics);
    
    void delete(Long tid);
    
    void deleteByBuildingCode(String buildingCode);
    
    void deleteByBuildingCodeAndItemCode(@Param("buildingCode") String buildingCode, 
                                        @Param("statisticsItemCode") String statisticsItemCode);
} 